Skip to content

Async Doc Auth Job Prep#4464

Merged
zachmargolis merged 13 commits intomasterfrom
margolis-async-doc-auth-job
Nov 27, 2020
Merged

Async Doc Auth Job Prep#4464
zachmargolis merged 13 commits intomasterfrom
margolis-async-doc-auth-job

Conversation

@zachmargolis
Copy link
Copy Markdown
Contributor

@zachmargolis zachmargolis commented Nov 26, 2020

Needs a few tweaks to the gem to be merged first: 18F/identity-idp-functions#42

  • Downloads files from fake S3 (aka plain URLs) in mock mode
  • Handles Base64 encoding of key/iv correctly

Once this is merged, we should be able to test the upload to S3 flow in lower envs, even with our fake YAML data instead of images

Copy link
Copy Markdown
Contributor

@aduth aduth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tried giving this a run-through in the browser. We're getting close, but still a few rough edges. Most of my comments aren't really in scope, but just a record of what I'd observed. For what this is aiming to accomplish, it's a good step forward 👍

front_image_url: params[:front_image_url],
back_image_url: params[:back_image_url],
selfie_image_url: params[:selfie_image_url],
liveness_checking_enabled: params[:liveness_checking_enabled],
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One thing I noticed in trying to test this in the browser is that we don't actually send an explicit parameter for this from the client. We could, or it also seems we could also reasonably derive this from the presence of a selfie_image_url. If we did that, not sure if it makes sense to consider here, or from within identity-idp-functions. I'd lean toward identity-idp-functions to have fewer things to wrangle.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great catch!

Since this this derives from DocAuthBaseStep we can just derive this from the server:

def liveness_checking_enabled?
FeatureManagement.liveness_checking_enabled? && (no_sp? || sp_session[:ial2_strict])
end

so even if the client sends a URL when it shouldn't, it wouldn't change the behavior?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in a62f450

trace_id: amzn_trace_id,
}
).run do |doc_auth_result|
document_capture_session.store_proofing_pii_from_doc(doc_auth_result)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In trying to test this in a real browser, I notice that we're not receiving the actual (fake) PII with doc_auth_result. Should we be?

I think we may still need some revisions to our logic to determine document status verification as "done" since it seems the actual result is being stored as proofing_job_result.pii[:document_result].

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great catch, I think that means we need to be need to be grabbing :document_result in the capture block locally, the controller already grabs that key: https://github.com/18F/identity-idp/blob/master/app/controllers/lambda_callback/document_proof_result_controller.rb

and I think I need to update the controller to actually contain the correct PII

@zachmargolis zachmargolis merged commit e350750 into master Nov 27, 2020
@zachmargolis zachmargolis deleted the margolis-async-doc-auth-job branch November 27, 2020 19:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants